{% extends "base.html" %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-xl-8 col-lg-10">
        <div class="card">
            <div class="card-header py-3 text-center">
                <h6 class="m-0 font-weight-bold text-primary">吉林大学招生协会抽题系统</h6>
            </div>
            <div class="card-body text-center">
                <h1 class="display-4 mb-4">欢迎使用抽题系统</h1>
                <p class="lead mb-4">点击下方按钮开始抽题</p>
                <button type="button" class="btn btn-primary btn-lg" onclick="drawQuestions()">
                    <i class="bi bi-shuffle me-2"></i>开始抽题
                </button>
            </div>
        </div>
    </div>
</div>

<!-- Questions Modal -->
<div class="modal fade" id="questionsModal" tabindex="-1">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">抽题结果</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <div class="modal-body">
                <div id="questionsList"></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="retryDraw()">
                    <i class="bi bi-arrow-repeat me-1"></i>重新抽取
                </button>
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block scripts %}
  <script src="{{ url_for('static', filename='js/chouti.js') }}"></script>
{% endblock %} 